package cn.edu.scau.cmi.xianjiehua.app;

import java.net.URL;
import java.util.ResourceBundle;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Button;

public class ViewController implements Initializable{
	
	@FXML
	private Button singleton;
	
	@FXML
	private Button simpleFactory;
	
	@FXML
	private Button factory;
	
	@FXML
	private Button abstractFactory;
	
	@FXML
	private Button adapter;
	
	@FXML
	private Button composite;
	
	@FXML
	private Button ormFramework;
	
	@FXML
	private Button SpringFramework;
	
	@Override
	public void initialize(URL location, ResourceBundle resources) {
		// TODO Auto-generated method stub
		
	}
	

	public void singletonEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.singleton.Main stage = new cn.edu.scau.cmi.xianjiehua.singleton.Main();
		stage.showWindow();
	}
	

	public void simpleFactoryEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.simpleFactory.Main stage = new cn.edu.scau.cmi.xianjiehua.simpleFactory.Main();
		stage.showWindow();
	}
	
	public void factoryEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.factory.Main stage = new cn.edu.scau.cmi.xianjiehua.factory.Main();
		stage.showWindow();
	}
	
	public void abstractFactoryEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.abstractFactory.Main stage = new cn.edu.scau.cmi.xianjiehua.abstractFactory.Main();
		stage.showWindow();
	}

	public void adapterEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.adapter.Main stage = new cn.edu.scau.cmi.xianjiehua.adapter.Main();
		stage.showWindow();
	}
	
	public void compositeEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.composite.Main stage = new cn.edu.scau.cmi.xianjiehua.composite.Main();
		stage.showWindow();
	}
	
	public void ormFrameworkEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.comprehension.client.Main stage = new cn.edu.scau.cmi.xianjiehua.comprehension.client.Main();
		stage.showWindow();
	}
	
	public void springFrameworkEvent(ActionEvent event) {
		cn.edu.scau.cmi.xianjiehua.spring.Main stage = new cn.edu.scau.cmi.xianjiehua.spring.Main();
		stage.showWindow();
	}
}
